//package com.servlet;
//
//import org.springframework.boot.web.servlet.FilterRegistrationBean;
//import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
//import org.springframework.boot.web.servlet.ServletRegistrationBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.Arrays;
//
///**
// * @author WZ
// * @version 1.0
// * @date 2021/9/2 11:56
// */
///*
//* 1/MyServlet--> /my
//* 2.DispatcherServlet --> /
//*
//*
//* */
//@Configuration
//public class MyRegistConfig {
//    @Bean
//	public ServletRegistrationBean myServlet(){
//		MyServlet myServlet = new MyServlet();
//		return new ServletRegistrationBean(myServlet,"/my","/myb");
//	}
//
//	@Bean
//	public FilterRegistrationBean myFilter(){
//		MyFilter myFilter = new MyFilter();
//		FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(myFilter);
//		filterRegistrationBean.setUrlPatterns(Arrays.asList("/my","/css/*"));
//		return filterRegistrationBean;
//	}
//
//	@Bean
//	public ServletListenerRegistrationBean mylistner(){
//		MySwervletContextListener mySwervletContextListener = new MySwervletContextListener();
//		return new ServletListenerRegistrationBean(mySwervletContextListener);
//	}
//}
